
$('#phonebtn').change(function () {
    $('.show-one').show()
    $('.show-two').hide()
})
$('#btn').change(function () {
    $('.show-one').hide()
    $('.show-two').show()
})

$('#login-btntwo').click(function () {
    console.log(123)
    let username = $('#phoneipttwo').val()
    let password = $('#password').val()
    let loginAPI = 'http://jx.xuzhixiang.top/ap/api/login.php';

    $.get(loginAPI, {
        username,
        password,
    }).then(res => {
        console.log(res)
        alert(res.msg)
        if (res.code == 1) {

            localStorage.setItem('username', res.data.username);

            localStorage.setItem('id', res.data.id);

            localStorage.setItem('token', res.data.token);

            location.href = 'index.html'
        }
    })
})